package twelfth.转换流OutputStream类与InputStream类;

import java.io.*;

public class InputStreamReader {
    public static void main(String[] args) throws IOException {
        String path = "D:" + File.separator + "WorkSpaces" + File.separator +
                "JavaDevelopBase_start_329" + File.separator + "src" + File.separator +
                "twelfth" + File.separator + "demo3.txt";
        File file = new File(path);
        Reader r = new java.io.InputStreamReader(new FileInputStream(file));
/*        BufferedReader bf = new BufferedReader(r);
        String data;
        while((data=bf.readLine())!=null){
            System.out.println(data);
        }*/
        char[] data = new char[1024];
        int len = r.read(data);
        System.out.println(new String(data, 0, len));
    }
}
